# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=superd
pkgver=0.4
pkgrel=0
pkgdesc="lightweight user service supervising daemon"
url="https://sr.ht/~craftyguy/superd"
arch="all"
options="net"
license="GPL-3.0-or-later"
makedepends="go make scdoc"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~craftyguy/superd/archive/$pkgver.tar.gz"

build() {
	unset LDFLAGS # passed as go linker flags and invalid
	make PREFIX="/usr" VERSION="$pkgver"
}

check() {
	XDG_RUNTIME_DIR="$(mktemp -d -p "$srcdir")" go test ./...
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" install
}

sha512sums="
94be9108f64a63062f85fe4b352c70df18daa8bb2e083991218e831239fc56a733488576e533a27b8926eda8eb27fd1a8cdecbf8c409d8fa2d714da354d5bfd2  superd-0.4.tar.gz
"
